<template>
  <view>
      <view class="cell" @click="selectDatePicker">
            <view class="cell-title " >
                {{detail}}
            </view>
            <view class="cell-title">
                {{dateString}}
            </view>
        </view>
        <jpTimePicker ref='date-time' :datestype="type" :datestring='dateString' @change='dateTimeChange'></jpTimePicker>
  </view>
</template>

<script>
import jpTimePicker from '@/components/jp-timePicker/jp-timePicker.vue'
export default {
   components: {
            jpTimePicker
        },
    data() {
            return {
                dateString: '',
                type: 'date',
                title: '展示时间',
                detail: '请选择日期'

            }
        },

         methods: {
            selectDatePicker() {
                this.$refs['date-time'].show();
                console.log();
            },
            dateTimeChange(value) {
                this.dateString = value
            }
        }
}
</script>

<style>

</style>